﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:Custom="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" 
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:Core="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions"
    >
    
    <Style x:Key="PhoneHyperlinkWithIcon" TargetType="HyperlinkButton">
        <Setter Property="Foreground" Value="{StaticResource PhoneForegroundBrush}"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="FontFamily" Value="{StaticResource PhoneFontFamilySemiLight}"/>
        <Setter Property="FontSize" Value="{StaticResource PhoneFontSizeExtraLarge}"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="Margin" Value="0,0,0,17"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="HyperlinkButton">
                    <Border Background="Transparent">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver"/>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="ContentElement" Storyboard.TargetProperty="Opacity" To="0.5" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentElement" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneDisabledBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border Background="{TemplateBinding Background}" Margin="{StaticResource PhoneHorizontalMargin}" Padding="{TemplateBinding Padding}" >
                            <ContentPresenter x:Name="ContentElement">

                            </ContentPresenter>
                            <!--<TextBlock x:Name="TextElement" Text="{TemplateBinding Content}" HorizontalAlignment="Left" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />-->
                        </Border>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="PhoneHyperlinkMenuStyle" TargetType="HyperlinkButton">
        <Setter Property="Foreground" Value="{StaticResource PhoneForegroundBrush}"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="FontFamily" Value="{StaticResource PhoneFontFamilySemiLight}"/>
        <Setter Property="FontSize" Value="{StaticResource PhoneFontSizeExtraLarge}"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="Margin" Value="0,0,0,17"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="HyperlinkButton">
                    <Border Background="Transparent">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver"/>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="TextElement" Storyboard.TargetProperty="Opacity" To="0.5" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TextElement" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneDisabledBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border Background="{TemplateBinding Background}" Margin="{StaticResource PhoneHorizontalMargin}" Padding="{TemplateBinding Padding}" >
                            <TextBlock x:Name="TextElement" Text="{TemplateBinding Content}" HorizontalAlignment="Left" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                        </Border>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--TextBlock to show when there are no items on the list-->
    <ControlTemplate x:Key="NoFavsTextBlock">
        <TextBlock 
            HorizontalAlignment="Stretch" VerticalAlignment="Top"
            Margin="40,20,20,0" 
            Style="{StaticResource PhoneTextLargeStyle}"
            Foreground="{StaticResource PhoneSubtleBrush}"
            Text="Nema izabranih predavanja."
            TextWrapping="Wrap"/>
    </ControlTemplate>

    <ControlTemplate x:Key="NoTwittsTextBlock">
        <TextBlock 
            HorizontalAlignment="Stretch" VerticalAlignment="Top"
            Margin="40,20,20,0" 
            Style="{StaticResource PhoneTextLargeStyle}"
            Foreground="{StaticResource PhoneSubtleBrush}"
            Text="Nema učitanih tweet-ova."
            TextWrapping="Wrap"/>
    </ControlTemplate>
</ResourceDictionary>
